package com.tiger.db.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

@Data
@TableName(value = "role", autoResultMap = true)
public class Role {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("creator_id")
    private long creatorId;

    @TableField("name")
    private String name;

    @TableField(value = "menus", typeHandler = JacksonTypeHandler.class)
    private Long[] menus;

    @TableField("remark")
    private String remark;

    @TableField("enable")
    private boolean enable;

    @TableField("sort")
    private Integer sort;

    @TableField("create_time")
    private long createTime;

    @TableField("update_time")
    private long updateTime;
}